package com.wordsay.entity;

import java.util.ArrayList;
import java.util.List;

public class PDialogAnalystResult extends AnalystResult {
	
	private String chatPeopleName;
	private List<HotItem> hotWords;
	private List<HotItem> hotPeriods;
	private List<HotItem> selfHotWords;
	private long talkCount;
	private long wordsCount;

	public PDialogAnalystResult(){
		
		this.hotWords = new ArrayList<HotItem>();
		this.hotPeriods = new ArrayList<HotItem>();
		
		this.selfHotWords = new ArrayList<HotItem>();
	}
	
	public String getChatPeopleName() {
		return chatPeopleName;
	}


	public void setChatPeopleName(String chatPeopleName) {
		this.chatPeopleName = chatPeopleName;
	}


	public List<HotItem> getHotWords() {
		return hotWords;
	}
	public void setHotWords(List<HotItem> hotWords) {
		this.hotWords = hotWords;
	}
	public List<HotItem> getHotPeriods() {
		return hotPeriods;
	}
	public void setHotPeriods(List<HotItem> hotPeriods) {
		this.hotPeriods = hotPeriods;
	}
	public long getTalkCount() {
		return talkCount;
	}
	public void setTalkCount(long talkCount) {
		this.talkCount = talkCount;
	}
	public long getWordsCount() {
		return wordsCount;
	}
	public void setWordsCount(long wordsCount) {
		this.wordsCount = wordsCount;
	}

	public List<HotItem> getSelfHotWords() {
		return selfHotWords;
	}

	public void setSelfHotWords(List<HotItem> selfHotWords) {
		this.selfHotWords = selfHotWords;
	}

	public void printResult() throws Exception{
		
		System.out.println("总共说了:"+this.talkCount+"句话");
		System.out.println("总共说了:"+this.wordsCount+"个词组");
		System.out.println("聊天中"+chatPeopleName+"经常说的词组是:");
		for(int i = 0; i < this.hotWords.size();i++){HotItem item = this.hotWords.get(i);System.out.println((i+1)+". -->"+item.getName()+"(说了"+item.getFrequency()+"次)");}
		System.out.println("和"+chatPeopleName+"的聊天中，我经常说的词组是:");
		for(int i = 0; i < this.selfHotWords.size();i++){HotItem item = this.selfHotWords.get(i);System.out.println((i+1)+". -->"+item.getName()+"(说了"+item.getFrequency()+"次)");}

		System.out.println("我俩经常聊天的时间段是");
		for(int i = 0; i < this.hotPeriods.size();i++){HotItem item = this.hotPeriods.get(i);System.out.println((i+1)+". -->"+item.getName()+"点到"+(Integer.valueOf(item.getName())+1)+"点 (说了"+item.getFrequency()+"句话)");}


	}
	
	
}
